import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'styleCommon.dart';

class ReturnButton extends StatelessWidget {
  String btnTitle;
  Function callBack;
  ReturnButton(this.btnTitle, this.callBack);
  @override
  Widget build(BuildContext context) {
    return getChatTemplate();
  }

  Widget getChatTemplate() {
    return Container(
      width: 200,
      decoration: BoxDecoration(
        boxShadow: [
          BoxShadow(
            color: Color(0xFFFED8B9),
            offset: Offset(0, 8),
            blurRadius: 11,
          ),
        ],
      ),
      child: MaterialButton(
        color: mainColor,
        height: 49,
        minWidth: 200,
        shape:
            RoundedRectangleBorder(borderRadius: BorderRadius.circular(24.0)),
        child: Text(btnTitle,
            style: TextStyle(fontSize: 18.0, color: Colors.white)),
        onPressed: () {
          // 按钮点击回调
          callBack('response');
        },
      ),
    );
    ;
  }
}
